import dayjs from "dayjs";
export function timeformat(params: number | string | Date): string {
  return dayjs(params).format("YYYY-MM-DD HH:mm:ss");
}

export function generateRandomString(length = 8): string {
  const characters =
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  let result = "";
  for (let i = 0; i < length; i++) {
    const randomIndex = Math.floor(Math.random() * characters.length);
    result += characters[randomIndex];
  }
  return result;
}


// 我在主项目中修改子项目, 添加一个函数
export function add(a: number, b: number): number {
  return a + b;
}